#pragma once

#include <string>
#include "DataTypes.h"
#include "GL/glew.h"
#include "GL/wglew.h"
#include "RenderComponent.h"
/**
* This class enables you to draw a textured cube.
* @author Koen Samyn
*/
class TexturedCube:public RenderComponent
{
public:
	/**
	* Creates a new textured cube. The diffuse texture is defined
	* by the filename.
	* @param diffuseTextureFileName the location of the diffuse texture.
	*/
	TexturedCube(float width, float length, float height, std::wstring diffuseTextureFileName);
	virtual ~TexturedCube(void);

	virtual void Draw();
	virtual void Init();

	void Vertex(float3& p, float2& uv);
private:
	float m_Width;
	float m_Length;
	float m_Height;
	/**
	* The vertices and texture coordinates.
	*/
	float3 m_ps[8];
	float2 m_uvs[4];
	/**
	* The location for the diffuse texture
	*/
	std::wstring m_DiffuseTextureFileName;
	/**
	* The openGL texture id
	*/ 
	GLuint m_TextureID;
};

